import sys
from PyQt5.QtWidgets import QApplication, QWidget,QVBoxLayout
from PyQt5.QtGui import QIcon,QWindow
from PyQt5.QtCore import Qt

class App(QWidget):
  def __init__(self):
          super().__init__()
          self.title='Hello, world!'
          self.left=5
          self.top=5
          self.width=1024
          self.height=768
          self.initUI()
          window = QWindow.fromWinId(113246212)
          window.setFlags(Qt.FramelessWindowHint)
          #window.setFlags(window.flags() | Qt.FramelessWindowHint)

          widget = QWidget.createWindowContainer(window,self,Qt.Widget)
          layout= QVBoxLayout()
          layout.addWidget(widget)
          self.setLayout(layout)

  def initUI(self):
          self.setWindowTitle(self.title)
          self.setGeometry(self.left,self.top,self.width,self.height)
          #self.show()

if __name__=='__main__':
    app=QApplication(sys.argv)
    ex=App()
    ex.show()
    ex.resize(800,600)
    sys.exit(app.exec_())
